using MicroMsg.UI.UserContrl;
using System;
using System.Data.Linq;
using System.Data.Linq.Mapping;
namespace MicroMsg.Storage
{
	[Table]
	public class QConversation : StorageItem, IListDataItem
	{
		private const uint Field_strUsrName = 1u;
		private const uint Field_strNickName = 2u;
		private const uint Field_nUnReadCount = 4u;
		private const uint Field_nStatus = 8u;
		private const uint Field_nIsSend = 16u;
		private const uint Field_nTime = 32u;
		private const uint Field_strContent = 64u;
		private const uint Field_strMsgType = 128u;
		private const uint Field_nMsgLocalID = 256u;
		private const uint Field_nMsgStatus = 512u;
		private const uint Field_bytesXmlData = 1024u;
		private string _strUsrName;
		private string _strNickName;
		private int _nUnReadCount;
		private int _nStatus;
		private int _nIsSend;
		private long _nTime;
		private string _strContent;
		private string _strMsgType;
		private int _nMsgLocalID;
		private int _nMsgStatus;
		private byte[] _bytesXmlData;
		[Column(IsVersion = true)]
		private Binary _version;
		[Column(IsPrimaryKey = true)]
		public string strUsrName
		{
			get
			{
				return this._strUsrName;
			}
			set
			{
				this._strUsrName = value;
				this.modify |= 1L;
			}
		}
		[Column]
		public string strNickName
		{
			get
			{
				return this._strNickName;
			}
			set
			{
				this._strNickName = value;
				this.modify |= 2L;
			}
		}
		[Column]
		public int nUnReadCount
		{
			get
			{
				return this._nUnReadCount;
			}
			set
			{
				this._nUnReadCount = value;
				this.modify |= 4L;
			}
		}
		[Column]
		public int nStatus
		{
			get
			{
				return this._nStatus;
			}
			set
			{
				this._nStatus = value;
				this.modify |= 8L;
			}
		}
		[Column]
		public int nIsSend
		{
			get
			{
				return this._nIsSend;
			}
			set
			{
				this._nIsSend = value;
				this.modify |= 16L;
			}
		}
		[Column]
		public long nTime
		{
			get
			{
				return this._nTime;
			}
			set
			{
				this._nTime = value;
				this.modify |= 32L;
			}
		}
		[Column]
		public string strContent
		{
			get
			{
				return this._strContent;
			}
			set
			{
				this._strContent = value;
				this.modify |= 64L;
			}
		}
		[Column]
		public string strMsgType
		{
			get
			{
				return this._strMsgType;
			}
			set
			{
				this._strMsgType = value;
				this.modify |= 128L;
			}
		}
		[Column]
		public int nMsgLocalID
		{
			get
			{
				return this._nMsgLocalID;
			}
			set
			{
				this._nMsgLocalID = value;
				this.modify |= 256L;
			}
		}
		[Column]
		public int nMsgStatus
		{
			get
			{
				return this._nMsgStatus;
			}
			set
			{
				this._nMsgStatus = value;
				this.modify |= 512L;
			}
		}
		[Column]
		public byte[] bytesXmlData
		{
			get
			{
				return this._bytesXmlData;
			}
			set
			{
				this._bytesXmlData = value;
				this.modify |= 1024L;
			}
		}
		public override void merge(object object_0)
		{
			QConversation qConversation = object_0 as QConversation;
			if (0L != (qConversation.modify & 1L))
			{
				this._strUsrName = qConversation.strUsrName;
			}
			if (0L != (qConversation.modify & 2L))
			{
				this._strNickName = qConversation.strNickName;
			}
			if (0L != (qConversation.modify & 4L))
			{
				this._nUnReadCount = qConversation.nUnReadCount;
			}
			if (0L != (qConversation.modify & 8L))
			{
				this._nStatus = qConversation.nStatus;
			}
			if (0L != (qConversation.modify & 16L))
			{
				this._nIsSend = qConversation.nIsSend;
			}
			if (0L != (qConversation.modify & 32L))
			{
				this._nTime = qConversation.nTime;
			}
			if (0L != (qConversation.modify & 64L))
			{
				this._strContent = qConversation.strContent;
			}
			if (0L != (qConversation.modify & 128L))
			{
				this._strMsgType = qConversation.strMsgType;
			}
			if (0L != (qConversation.modify & 256L))
			{
				this._nMsgLocalID = qConversation.nMsgLocalID;
			}
			if (0L != (qConversation.modify & 512L))
			{
				this._nMsgStatus = qConversation.nMsgStatus;
			}
			if (0L != (qConversation.modify & 1024L))
			{
				this._bytesXmlData = qConversation.bytesXmlData;
			}
		}
		public void FillData(object item)
		{
			QConversation qConversation = item as QConversation;
			if (qConversation == null)
			{
				return;
			}
			qConversation.strUsrName = this.strUsrName;
			qConversation.strNickName = this.strNickName;
			qConversation.nUnReadCount = this.nUnReadCount;
			qConversation.nStatus = this.nStatus;
			qConversation.nIsSend = this.nIsSend;
			qConversation.nTime = this.nTime;
			qConversation.strContent = this.strContent;
			qConversation.strMsgType = this.strMsgType;
			qConversation.nMsgLocalID = this.nMsgLocalID;
		}
	}
}
